<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
    
</head>
<body>

<!--MESSAGE-->
<? if (isset($message) && $message!=""){ ?>
	<?=$message?><br /><br />
<? } ?>  

<table border="0" cellpadding="10" cellspacing="0" width="100%">
  <tr>
    <td align="center" valign="top" bgcolor="#FFFFFF"><!--HEADER-->
        <table border="0" cellpadding="0" cellspacing="0" width="630" style="border-bottom-style:solid; border-bottom-color:#666666; border-bottom-width:1px;">
          <tr>
            <td align="left" valign="top" bgcolor="#FFFFFF" style="padding-left:20px;padding-right:20px;padding-bottom:20px;"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:0px;">
              <tr>
                <td valign="top" style=" text-transform:uppercase;font-family:Arial, Helvetica, sans-serif;font-size:18px;color:#333333;font-weight:bold; padding-right:40px; padding-top:20px;"><a href="<?=$link?>"><img src="<?=base_url()?>assets/website/images/deferranti-logo.gif" alt="<?=INSTANCE_NAME?>" width="293" height="38"></a></td>
              </tr>
            </table>
                </td>
          </tr>
        </table>
      <!--CONTENT-->
        <table border="0" cellpadding="0" cellspacing="0" width="630">
          <tr>
            <td align="left" valign="top" bgcolor="#FFFFFF" style="padding:20px;"><!--CONTENT HEADER-->
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:0px;">
                  <tr>
                    <td valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:29px;margin:0;color:#333333;font-weight:bold;line-height:1em;padding-right:40px;padding-bottom:5px;"><?=$title?></td>
                  </tr>
                </table>
              <!--CONTENT SUB-HEADER-->
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:0px;">
                  <tr>
                    <td valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:18px;margin-top:0;color:#666666;font-weight:normal;line-height:20px;padding-bottom:15px;"><?=$introduction?></td>
                  </tr>
                </table>
              <!--CONTENT TEXT WITH 0PX TOP MARGIN-->
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:0px;">
                  <tr>
                    <td valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:16px;color:#333333;font-weight:light; padding-bottom:20px;"><?=$description?></td>
                  </tr>
                </table>
              <!--CONTENT IMAGE-->
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:0px;">
                  <tr>
                    <td valign="top" style="padding-bottom:0px;"><img src="<?=$image?>" alt="De Ferranti" width="589" height="385" border="0"></td>
                  </tr>
                </table>
                
                
              <!--CONTENT 2 COLUMN TEXT, 20PX TOP MARGIN-->
              <? if(!empty($applications) || !empty($specifications)) { ?>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:20px;">
                  <tr>
                    <td width="183" valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:16px;color:#333333;font-weight:light; padding-bottom:0px;">
					<? if(!empty($specifications)) { ?>
                    	<strong>Product Specifications:</strong><br>
						<? foreach($specifications as $spec) { ?>
                            <?=$spec['Name_Specs']?>: <?=$spec['Value']?> <?=@$spec['Units']?><br/>
                        <? } ?>
                    <? } ?></td>
                    <td width="20" valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;color:#333333;font-weight:light;">&nbsp;</td>
                    <td width="183" valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:16px;color:#333333;font-weight:light; padding-bottom:0px;">
                    <? if(!empty($applications)) { ?>
                    	<strong>Product Applications:</strong><br>
						<? 
						// create two columns if necessary
						if ((count($specifications) >= count($applications)) || (count($applications)<4))  { 
							$end = count($applications); 
							$start = $end;
						} else { 
							$end = ceil(count($applications)/2); 
							$start = $end;
						}
						
						for($i=0; $i<$end; $i++) { ?>
                            <?=$applications[$i]['Name_Applications']?><br/>
                        <? } ?>
                    <? } ?>
                    </td>
                    <td width="20" valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:16px;color:#333333;font-weight:light; padding-bottom:0px;">&nbsp;</td>
                    <td width="183" valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:16px;color:#333333;font-weight:light; padding-bottom:0px;"><br>
                    <? if(!empty($applications)) { ?>
						<? for($i=$start; $i<=count($applications)-1; $i++) { ?>
                            <?=$applications[$i]['Name_Applications']?><br/>
                        <? } ?>
                    <? } ?>
                    </td>
                  </tr>
              </table>

			<!--PRDUCTS USED IN PORTFOLIO -->              
            <? } else if(!empty($products_used)) { ?>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:20px;">
                  <tr>
                    <td valign="top" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:16px;color:#333333;font-weight:light; padding-bottom:0px;">
                <strong>Products used in this application:</strong><br>
                <? foreach($products_used as $p) { ?>
                    <?=$p['Name_Products']?><br/>
                <? } ?>
                    </td>
                  </tr>
              </table>
			<? } ?>
              
              </td>
          </tr>
        </table>
      <!--FOOTER-->
        <table width="630" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-top-style:solid; border-top-color:#666666; border-top-width:1px;border-bottom-style:solid; border-bottom-color:#666666; border-bottom-width:0px;">
          <tr>
            <td align="left" valign="top" style="text-align:left; line-height:15px;padding-right:10px;padding-left:20px;padding-bottom:20px;padding-top:20px;font-family:Arial, Helvetica, sans-serif;font-size:11px;color:#000000"> 
				<?=$this->lang->line('FooterContacts');?>
                <p></p>
          	</td>
          </tr>
      </table></td>
  </tr>
</table>
</body>
</html>